<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			function createPerson(name,age,address)
			{
				var obj=new Object();
				obj.name=name;
				obj.age=age;
				obj.address=address;
				obj.sayname=function()
				{
					alert(this.name);
				}
				return obj;
			}
			var obj1=createPerson("林润钿",19,"海南");
			var obj2=createPerson("戴阳",22,"茂名");
			var obj3=createPerson("答案",22,"湖南");
			
			console.log(obj1);
			console.log(obj2);
			console.log(obj3);
			obj1.sayname();
		</script>
	</head>
	<body>
	</body>
</html>